<!DOCTYPE html>
<html lang="en">
<head>

	<meta charset="utf-8">
	<title>Search Resident</title>
	<link rel="stylesheet" href="<?php echo base_url();?>/application/development-bundle/themes/custom-theme/jquery.ui.all.css">
	<link rel="stylesheet" href="<?php echo base_url();?>/application/css/style.css">
	<script src="<?php echo base_url();?>/application/development-bundle/jquery-1.4.4.js"></script>
	<script src="<?php echo base_url();?>/application/development-bundle/ui/jquery.ui.core.js"></script>
	<script src="<?php echo base_url();?>/application/development-bundle/ui/jquery.ui.widget.js"></script>
	<script src="<?php echo base_url();?>/application/development-bundle/ui/jquery.ui.accordion.js"></script>
	<link rel="stylesheet" href="<?php echo base_url();?>/application/development-bundle/demos/demos.css">
	
	<script>
	$(function() {
		$( "#accordion" ).accordion({
			autoHeight: false,
			navigation: true,
			collapsible: true,
			active: -1
		});
	});
	</script>
	
	<script>
	function OnSubmitForm(){
		if(document.pressed == "Main Menu"){
			document.adminform.action ="<?php echo base_url();?>/index.php/adminPageController";
			return true;
		}
	}
	</script>
	
</head>

<body>

<div class="demo">
	
	<div id="header"><h1>ACCI eXtreme Information System</h1></div>

	<div id="accordion">
	
		<h3><a href="#section1">Search a Resident</a></h3>
		<form name="adminform" method="post" onSubmit="return OnSubmitForm();">
			<h3>Resident's Information</h3>
			<div>
				<?php if($data->num_rows()>0){?>
				<?php foreach($data->result() as $row):?>
					Student Number: <?php echo $row->student_number;?><br/>
					Name: <?php echo $row->first_name;?> <?php echo $row->middle_name;?> <?php echo $row->last_name;?><br/><br/>
					
					Gender: <?php echo $row->gender;?><br/>
					Civil Status: <?php echo $row->civil_status;?><br/>
					Birthday: <?php echo $row->birthday;?><br/>
					Religion: <?php echo $row->religion;?><br/>
					Course: <?php echo $row->course;?><br/>
					College: <?php echo $row->college;?><br/>
					Classification: <?php echo $row->classification;?><br/><br/>

					Home Address: <?php echo $row->home_address;?><br/>
					Telephone Number: <?php echo $row->telephone_number;?><br/>
					Email: <?php echo $row->email_address;?><br/>
					Region: <?php echo $row->region;?><br/><br/>
					
					Name of Father: <?php echo $row->name_of_father;?><br/>
					Contact Number: <?php echo $row->telnumber_of_father;?><br/>
					Name of Mother: <?php echo $row->name_of_mother;?><br/>
					Contact Number: <?php echo $row->telnumber_of_mother;?><br/>
					Guardian: <?php echo $row->name_of_guardian;?><br/>
					Contact Number: <?php echo $row->telnumber_of_guardian;?><br/><br/>
				<?php endforeach;?>
				<?php }else{?>
					Student not found<br/><br/>
				<?php }?>
				<input type="submit" value="Main Menu" onClick="document.pressed=this.value" />
			</div>
		</form>
		
	</div><!-- End accordion -->

</div><!-- End demo -->

</body>
</html>
